package com.msds.parent.persist.mapper;

import com.msds.parent.persist.po.AAdmins;
import com.msds.parent.persist.po.AAdminsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface AAdminsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @SelectProvider(type=AAdminsSqlProvider.class, method="countByExample")
    long countByExample(AAdminsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @DeleteProvider(type=AAdminsSqlProvider.class, method="deleteByExample")
    int deleteByExample(AAdminsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @Delete({
        "delete from a_admins",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @Insert({
        "insert into a_admins (id, ssoId, ",
        "email, trueName, ",
        "status, createTime, ",
        "updateTime, lastLoginTime)",
        "values (#{id,jdbcType=INTEGER}, #{ssoid,jdbcType=INTEGER}, ",
        "#{email,jdbcType=VARCHAR}, #{truename,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP}, ",
        "#{updatetime,jdbcType=TIMESTAMP}, #{lastlogintime,jdbcType=TIMESTAMP})"
    })
    int insert(AAdmins record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @InsertProvider(type=AAdminsSqlProvider.class, method="insertSelective")
    int insertSelective(AAdmins record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @SelectProvider(type=AAdminsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ssoId", property="ssoid", jdbcType=JdbcType.INTEGER),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="trueName", property="truename", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updatetime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="lastLoginTime", property="lastlogintime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<AAdmins> selectByExample(AAdminsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @Select({
        "select",
        "id, ssoId, email, trueName, status, createTime, updateTime, lastLoginTime",
        "from a_admins",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="ssoId", property="ssoid", jdbcType=JdbcType.INTEGER),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="trueName", property="truename", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updatetime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="lastLoginTime", property="lastlogintime", jdbcType=JdbcType.TIMESTAMP)
    })
    AAdmins selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @UpdateProvider(type=AAdminsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") AAdmins record, @Param("example") AAdminsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @UpdateProvider(type=AAdminsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") AAdmins record, @Param("example") AAdminsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @UpdateProvider(type=AAdminsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(AAdmins record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_admins
     *
     * @mbg.generated Thu Nov 02 10:49:10 CST 2017
     */
    @Update({
        "update a_admins",
        "set ssoId = #{ssoid,jdbcType=INTEGER},",
          "email = #{email,jdbcType=VARCHAR},",
          "trueName = #{truename,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "createTime = #{createtime,jdbcType=TIMESTAMP},",
          "updateTime = #{updatetime,jdbcType=TIMESTAMP},",
          "lastLoginTime = #{lastlogintime,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(AAdmins record);
}